/*
 * FileName: tplDecltype.cc
 * Author: 李波(Edwin Lee)
 * Date: 2024-07-14 11:24:04
 * Version: 1.0
 * Description: 模板函数推演练习 编译要添加-std=c++17
 */
#include <iostream>
#include <typeinfo>
#include <cxxabi.h>
using namespace std;

template<typename T>
void func(T a)
{
	//abi::__cxa_demangle重构了输出结果
	cout << abi::__cxa_demangle(typeid(T).name(),NULL,NULL,NULL) << endl;
}

int sum(int a,int b){return a + b;}
int main()
{
	func(10);
	func("aaa");
	func(sum);
	return 0;
	
}
